import os
from pathlib import Path

DOMAIN = "rethink.run"
RETHINK_DIR = Path(__file__).parent.parent
DOT_DATA = ".data"
FRONTEND_DIR = RETHINK_DIR / "dist-local"
LOCAL_FILE_URL_PRE_DIR = "files"
ANALYTICS_DIR = Path(os.path.join(os.getcwd(), "analytics"))
MAX_USER_BEHAVIOR_LOG_SIZE = 1024 * 1024 * 10  # 10MB
MD_MAX_LENGTH = 100_000
REQUEST_ID_MAX_LENGTH = 50
UID_MAX_LENGTH = 30
NID_MAX_LENGTH = 30
FID_MAX_LENGTH = 30
SEARCH_QUERY_MAX_LENGTH = 200
RECOMMEND_CONTENT_MAX_LENGTH = 100
EMAIL_MAX_LENGTH = 100
PASSWORD_MAX_LENGTH = 20
NICKNAME_MAX_LENGTH = 20
IMG_RESIZE_THRESHOLD = 1024 * 1024 * 3  # 3MB
MAX_UPLOAD_FILE_SIZE = 1024 * 1024 * 50  # 50MB
PLUGIN_ID_MAX_LENGTH = 40
MAX_MD_BACKUP_VERSIONS = 10
SEARCH_LIMIT_MAX = 100
MAX_STATISTIC_REMARK_LENGTH = 1000
MAX_SYSTEM_NOTICE_TITLE_LENGTH = 100
MAX_SYSTEM_NOTICE_CONTENT_LENGTH = 5000
MAX_SCHEDULE_JOB_INFO_LEN = 1000

COOKIE_ACCESS_TOKEN = "rethinkAccessToken"
COOKIE_REFRESH_TOKEN = "rethinkRefreshToken"
COOKIE_REFRESH_TOKEN_ID = "rethinkRefreshTokenID"

HEADER_ACCESS_TOKEN = "Access-Token"
HEADER_REFRESH_TOKEN = "Refresh-Token"
HEADER_REFRESH_TOKEN_ID = "Refresh-Token-Id"
